#lang rosetta-racket


(provide line-vertical-extrude
         line-oblique-extrude
         line-closed-vertical-extrude
         line-closed-oblique-extrude
         surface-vertical-extrude
         surface-oblique-extrude)


(define (line-vertical-extrude)
  (lift
   (thunk (displayln "Extruding a line vertically"))
   (extrude
    2
    uz
    (line u0 ux uy))))

(define (line-oblique-extrude)
  (lift
   (thunk (displayln "Extruding a line vertically"))
   (extrude
    2
    (xyz 0.5 2 1)
    (line u0 ux uy))))

(define (line-closed-vertical-extrude)
  (lift
   (thunk (displayln "Extruding a closed line obliquely"))
   (extrude
    2
    uz
    (circle 1))))

(define (line-closed-oblique-extrude)
  (lift
   (thunk (displayln "Extruding a closed line obliquely"))
   (extrude
    2
    (xyz 0.5 2 1)
    (circle 1))))


(define (surface-vertical-extrude)
  (lift
   (thunk (displayln "Extruding a surface vertically"))
   (extrude
    2
    uz
    (circle-surface 1))))

(define (surface-oblique-extrude)
  (lift
   (thunk (displayln "Extruding a surface vertically"))
   (extrude
    2
    (xyz 0.5 2 1)
    (circle-surface 1))))